#ifndef WF_SELECTINTERSECTED_H
#define WF_SELECTINTERSECTED_H

#include "pf_previewactioninterface.h"
#include "pf_vector.h"
#include "gui_export.h"

/**
 * This action class can handle user events to select all entities.
 *
 */
class GUI_EXPORT WF_SelectIntersected : public PF_PreviewActionInterface {
	Q_OBJECT
public:
    /**
     * Action States.
     */
    enum Status {
        SetPoint1,     /**< Setting the 1st corner of the window.  */
        SetPoint2      /**< Setting the 2nd corner of the window. */
    };

public:
    WF_SelectIntersected(PF_Container& container,
                         PF_GraphicView& graphicView,
                         bool select);
    ~WF_SelectIntersected() {}

	static QAction* createGUIAction(LX_Define::ActionType type, QObject* /*parent*/);

	virtual LX_Define::ActionType rtti() {
		return LX_Define::ActionSelectIntersected;
	}

    virtual void init(int status=0);
	
    virtual void trigger();
	
    virtual void mouseMoveEvent(PF_MouseEvent* e);
    virtual void mousePressEvent(PF_MouseEvent* e);
    virtual void mouseReleaseEvent(PF_MouseEvent* e);
	
    virtual void updateMouseButtonHints();
    virtual void updateMouseCursor();
    virtual void updateToolBar();

protected:
    PF_Vector v1;
    PF_Vector v2;

    bool select;
};

#endif
